class Base{
    public int a;
    public int b;

    public Base(int a, int b) {
        this.a = a;
        this.b = b;
    }

    //表示无参或者默认的构造函数
    public Base() {

    }
}

class Derived extends Base{
    public int c;
    public void method(){
        a = 10;
        b = 20;
        c = 30;
    }

    public Derived(int c){
        super(10,30);
        this.c = c;

    }
    public Derived(int a,int b,int c){
        super(a,b);
        this.c = c;
    }

    public Derived(){
        super();
    }

    public Derived(int a,int b ){
        super();
    }
}

class Animal{
    static{
        System.out.println("AnimalStatic");
    }
    {
        System.out.println("Animal{}");
    }

    public Animal() {
        System.out.println("Animal()");
    }
}

class Cat extends Animal{
    static {
        System.out.println("CatStatic");
    }
    {
        System.out.println("Cat{}");
    }
    public Cat(){
        super();
        System.out.println("Cat()");

    }
}
class Text1 {
    public static void main(String[] args) {
        Text text = new Text();
        System.out.println(text.a+10);
    }
}
public class Text {
    protected int a = 1000;
    public static void main(String[] args) {
        Text text = new Text();
        System.out.println(text.a);
    }
}

//class Base{
//    public int a;
//    public int b;
//    public char c;
//    public int p;
//}
//
//class Derived extends Base{
//    public int a;
//    public char b;
//    public int c;
//    public int d;
//
//    public void method(){
//        a = 10;
//        super.a = 100;
//        b = 'A';
//        super.b =200;
//        c = 30;
//        super.c = 'W';
//        d = 666;
//        //f = 777;
//        p = 999;
//    }
//}

//class Base{
//    public void methodA(){
//        System.out.println("A方法");
//    }
//}
//
//class Derived extends Base{
//
//    public void methodB(){
//        System.out.println("B方法");
//    }
//
//    public void methodC(){
//        methodA();
//        methodB();
//    }
//
//}

//class Base{
//    public void methodA(){
//        System.out.println("A方法");
//    }
//        public void methodB(){
//        System.out.println("B方法");
//    }
//}
//class Derived extends Base{
//    public void methodA(int a){
//        System.out.println("A方法"+ a);
//    }
//    public void methodB(){
//        System.out.println("B方法");
//    }
//    public void methodC(){
//        methodA();
//        methodA(10);
//        methodB();
//    }
//}

